package dkzcm.club.oss.adapter;

import dkzcm.club.oss.entity.FileInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

public interface StorageAdapter {
    void createBucket(String bucket);

    void uploadFile(MultipartFile uploadFile, String bucket, String objectName);

    List<String> getAllBucket();

    // 列出当前桶的文件
    List<FileInfo> gatAllFile(String bucket);

    //  下载文件
    InputStream downLoad(String bucket, String objectName);


    //   删除桶
    void deleteBucket(String bucket);

    //    删除文件
    void deleteObject(String bucket, String objectName);

}
